package com.kitty.web.client;


import com.alibaba.fastjson.JSON;
import com.kitty.common.utils.SpringUtils;
import com.kitty.game.gm.handler.GMFather;
import com.kitty.game.role.model.Role;
import com.kitty.game.role.service.RoleService;
import com.kitty.game.utils.JsonUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.mina.core.session.IoSession;
import org.springframework.stereotype.Service;

import java.util.Map;
import java.util.concurrent.ConcurrentMap;

@Service
@Slf4j
public class GmCloseAi implements GMFather {
    @Override
    public boolean handle(Role role, String content) {
        Long uid = Long.parseLong(content);
        RoleService roleService = SpringUtils.getBean(RoleService.class);
        Role playerBy = roleService.getPlayerBy(uid);
        log.info(JsonUtils.object2String(playerBy));
        return true;
    }
}
